﻿using AuthCenter.Application.Contracts;
using Volo.Abp;
using Volo.Abp.Modularity;

namespace AuthCenter.HttpApi
{
    [DependsOn(typeof(ApplicationContractsModule))]
    public class HttpApiModule: AbpModule
    {
        public override void PreConfigureServices(ServiceConfigurationContext context)
        {
            // 取消自动注册
            //SkipAutoServiceRegistration = true;
        }


        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            // 注册自己的服务
            //context.Services.AddAssemblyOf<BlogModule>();
            context.Services.AddControllers();
            // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
            context.Services.AddEndpointsApiExplorer();
            context.Services.AddSwaggerGen();
        }

        public override void OnApplicationInitialization(ApplicationInitializationContext context)
        {
            //context.AddMiddleware();
            base.OnApplicationInitialization(context);
        }
    }
}
